/**
 * @author LKQ
 * @date 2021/12/31 10:16
 * @description
 */
public class Solution {
    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.checkPerfectNumber(2));
    }
    public boolean checkPerfectNumber(int num) {
        int ans = 0;
        for (int i = 1; i * i <= num; i++) {
            if (num % i == 0 ) {
                ans += num / i == num ? i: i + num / i;
            }
        }
        return ans == num;
    }
}
